package com.study.project.config.exception;
/**
 * @author yangjie
 *
 * @see BusinessException
 * @date 2024/4/13-17:12
 */
public class BusinessException extends BaseException {
    public BusinessException(ErrorCode errorCode) {
        super(errorCode);
    }

    public BusinessException(ErrorCode errorCode, Throwable e) {
        super(errorCode, e);
    }

    public BusinessException(String errorCode, String errMessage) {
        super(errorCode, errMessage);
    }

    public BusinessException(String errorCode, String errMessage, Throwable e) {
        super(errorCode, errMessage, e);
    }

    @Override
    public String getMessage() {
        return "code=" + super.getErrorCode().getCode() + ", msg=" + super.getErrorCode().getMsg();
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
